Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure TaintBasedEviction int test not rely on TaintNodeByConditions #84036

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

Huang-Wei
Copy link
Member

What type of PR is this?

A followup on #82703 (comment)

What this PR does / why we need it:

Right now, the TaintBasedEviction integration test relies on setting TaintNodeByConditions to false, which is not a reasonable assumption.

Which issue(s) this PR fixes:

Prerequisite of #82703.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

/sig scheduling
/cc @draveness @ahg-g
/kind bug

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 17, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Huang-Wei

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2019
@@ -381,7 +381,8 @@ func nodeTainted(cs clientset.Interface, nodeName string, taints []v1.Taint) wai
return false, err
}

if len(taints) != len(node.Spec.Taints) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of the testcase, if both TaintBasedEviction and TaintNodeByCondtions are enabled, there should be at least 2 taints (NotReady:NoExecute and NotReady:NoSchedule) applied, so comparing the size is absolutely incorrect.

And also the comment said "contain", the old logic doesn't follow either.

@draveness
Copy link
Contributor

/retest

Copy link
Contributor

@draveness draveness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 17, 2019
@damemi
Copy link
Contributor

damemi commented Oct 17, 2019

Thanks for the update, this test has been bugging me

@k8s-ci-robot k8s-ci-robot merged commit 534051a into kubernetes:master Oct 17, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Oct 17, 2019
@damemi
Copy link
Contributor

damemi commented Oct 17, 2019

@Huang-Wei do you know if this change will fix #83321?

@Huang-Wei Huang-Wei deleted the tbe-int-test-issue branch October 17, 2019 15:51
@Huang-Wei
Copy link
Member Author

@damemi Probably. The old testing logic actually was based on an enabled TaintNodeByCondition flag, while composing the node lifecycle manager by disabling it - which is inconsistent, so might cause issues. Let see how the test goes, it it still flakes, the most suspicious things could be the node lifecycle controller resync/gracePeriod settings, or the admission settings.

@damemi
Copy link
Contributor

damemi commented Oct 17, 2019

@Huang-Wei thanks, I did notice before that TaintNodeByCondition was disabled, and reading through the code assumed this was intentional (as the exact taint we were expecting is added by TaintBasedEvictions)

k8s-ci-robot added a commit that referenced this pull request Dec 6, 2019
…856-#84036-#84766-#84883-upstream-release-1.14

Automated cherry pick of #81856: Convert tbe e2e to integration test #84036: Ensure TaintBasedEviction int test not rely on #84766: Fix a TaintBasedEviction integration test flake #84883: Update test logic to simulate NodeReady/False and
k8s-ci-robot added a commit that referenced this pull request Dec 6, 2019
…856-#84036-#84766-#84883-upstream-release-1.15

Automated cherry pick of #81856: Convert tbe e2e to integration test #84036: Ensure TaintBasedEviction int test not rely on #84766: Fix a TaintBasedEviction integration test flake #84883: Update test logic to simulate NodeReady/False and
k8s-ci-robot added a commit that referenced this pull request Dec 6, 2019
…856-#84036-#84766-#84883-upstream-release-1.16

Automated cherry pick of #81856: Convert tbe e2e to integration test #84036: Ensure TaintBasedEviction int test not rely on #84766: Fix a TaintBasedEviction integration test flake #84883: Update test logic to simulate NodeReady/False and
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants